<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ol>
    <li>btoa将ascii码字符串或二进制数据转换成base64编码过的字符串</li>
    <li>atob将base64编码过的字符串转换成ascii码字符串或二进制数据</li>
    <li>不支持中文</li>
</ol>
<script>
    let encodeData = btoa('hello world');
    console.log('encodeData', encodeData);
    let decodeData = atob(encodeData);
    console.log('decodeData', decodeData);
</script>
</body>
</html>